﻿using Microsoft.Extensions.Configuration;
using MiniFox.Configurations;
using MiniFox.Utility;

namespace MiniFox.Platform.Configurations
{
    /// <summary>
    /// 手机验证码配置
    /// </summary>
    [Section(ELEMENT_NAME)]
    public class PinCodeConfiguration
    {
        internal const string ELEMENT_NAME = "minifox:pincode";

        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("codeType")]
        public CodeType CodeType
        {
            get;
            set;
        }
        /// <summary>
        /// 验证时忽略大小写
        /// </summary>
        [ConfigurationKeyName("ignoreCase")]
        public bool IgnoreCase
        {
            get;
            set;
        }
        /// <summary>
        /// 验证码位数
        /// </summary>
        [ConfigurationKeyName("codeLen")]
        public int CodeLen
        {
            get;
            set;
        }
        /// <summary>
        /// 验证码过期时间(秒)，默认300
        /// </summary>
        [ConfigurationKeyName("codeExpiration")]
        public int CodeExpiration
        {
            get;
            set;
        }
        /// <summary>
        /// 票据过期时间(秒)
        /// </summary>
        [ConfigurationKeyName("ticketExpiration")]
        public int TicketExpiration
        {
            get;
            set;
        }
    }
}

